import Vue from 'vue';
// 富文本段落间距空隙
import '@/utils/paragraphSpacing'

import Cookies from 'js-cookie';

import 'normalize.css/normalize.css';

import Element from 'element-ui';

// 数据字典
import dict from './components/Dict';

// 权限指令
import checkPer from '@/utils/permission';
import permission from './components/Permission';
import './assets/styles/element-variables.scss';

// global css
import './assets/styles/index.scss';

import App from './App';
import store from './store';
import router from './router/routers';

import './assets/icons'; // icon
import './router/index'; // permission control
import Viewer from 'v-viewer';
import 'viewerjs/dist/viewer.css';
Vue.use(Viewer);
window.store = store;
Vue.prototype.$store = store;
Viewer.setDefaults({
  Options: {
    "inline": true,  //启动inline模式
    "button": true,  //显示右上角关闭按钮
    "navbar": true,  //显示缩略图导航
    "title": true,  //显示当前图片标题
    "toolbar": true,  //显示工具栏
    "tooltip": true,  //显示缩放百分比
    "movable": true,  //图片是否可以移动
    "zoomable": true,  //图片是否可以缩放
    "rotatable": true,  //图片是否可以旋转
    "scalable": true,  //图片是否可以翻转
    "transition": true,  //使用CSS3过度
    "fullscreen": true,  //播放时是否全屏
    "keyboard": true,  //是否支持键盘
    "url": "data-source" //设置大图片的 url
  }
});
Vue.use(checkPer);
Vue.use(permission);
Vue.use(dict);
Vue.use(Element, {
  size: Cookies.get('size') || 'small' // set element-ui default size
});

Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
});
